import request from '@/utils/request'

// 查询购票记录列表
export function listPurchase(query) {
  return request({
    url: '/bussiness/purchase/list',
    method: 'get',
    params: query
  })
}

// 查询购票记录详细
export function getPurchase(purchaseId) {
  return request({
    url: '/bussiness/purchase/' + purchaseId,
    method: 'get'
  })
}

// 新增购票记录
export function addPurchase(data) {
  return request({
    url: '/bussiness/purchase',
    method: 'post',
    data: data
  })
}

// 修改购票记录
export function updatePurchase(data) {
  return request({
    url: '/bussiness/purchase',
    method: 'put',
    data: data
  })
}

// 删除购票记录
export function delPurchase(purchaseId) {
  return request({
    url: '/bussiness/purchase/' + purchaseId,
    method: 'delete'
  })
}

// 核销购票记录
export function verifyTicket(purchaseId){
  return request({
    url: '/bussiness/purchase/verify/' + purchaseId,
    method: 'get'
  })
}